package com.atstudy.entites;

import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

@ToString
@Data
public class Account {
    private Integer id;
    @NotNull
    @Size(min = 4, max = 8)
    private String name;
    private Integer balance;
    private Date createTime;
    private Date updateTime;

    public Account(Integer id, String name, Integer balance) {
        this.id = id;
        this.name = name;
        this.balance = balance;
    }
}